Skip to content

Exclude built code folders from stylistic PHPCS rules#342

Merged
kadamwhite merged 3 commits into
mainfrom
asset-manifest-exceptions
Jun 26, 2026
Merged

Exclude built code folders from stylistic PHPCS rules#342
kadamwhite merged 3 commits into
mainfrom
asset-manifest-exceptions

Conversation

@kadamwhite

@kadamwhite kadamwhite commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Built asset files are standard under current wp-scripts best practices, so our ruleset should not enforce human-authorship-oriented sniffs on these autogenerated files.

I've limited our exclusions to the default build/ and oft-used dist/ folder prefixes.

@rmccue rmccue left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense; I assume because this isn't prefixed with * that eg inc/tools/build/foo.php would still be included?

@kadamwhite

Copy link
Copy Markdown
Collaborator Author

I assume because this isn't prefixed with * that eg inc/tools/build/foo.php would still be included?

Correct!

@kadamwhite kadamwhite merged commit 3b83d48 into main Jun 26, 2026
3 checks passed
@kadamwhite kadamwhite deleted the asset-manifest-exceptions branch June 26, 2026 18:00
@kadamwhite kadamwhite changed the title Exclude @wordpress/scripts-generated *.asset.php files from certain rules Exclude @wordpress/scripts-generated *.asset.php files from stylistic rules Jun 26, 2026
@kadamwhite kadamwhite changed the title Exclude @wordpress/scripts-generated *.asset.php files from stylistic rules Exclude built code folders from stylistic PHPCS rules Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants